<!-- 用户协议和隐私政策 -->
<template>
	<view class="container">
		<web-view :src="state.url"></web-view>
	</view>
</template>

<script setup>
import { reactive } from 'vue';
import { formPost, post } from '@/request/index.js';
import FormData from '@/request/formData.js';
import { onLoad } from '@dcloudio/uni-app';

const state = reactive({
	type: '',
	url: ''
});

onLoad((option) => {
	state.type = option.type;
	getContent();
});

const getContent = async () => {
	const res = await post('mm/baseInfo');
	const { code, data } = res;
	if (code == 200) {
		if (state.type == 1) {
			state.url = data.privacy.user_privacy;
		} else {
			state.url = data.privacy.user_agreement;
		}
	}
};
</script>
